/**
 * Created by xuwei on 2017/7/12.
 * 资讯管理相关接口
 */
import ajax from 'service/ajax'
const url1='/APICategory/index'
const url2='/APICategory/modify'

const url3='/APINotice/index'
const url4='/APINotice/modify'
const url5='/APINotice/create'
const url6='/APICategory/create'
const url7='/APINotice/detail'

export default {
    getCategoryList:(data = {})=>{
        return ajax({
            url: url1,
            data: data,
            method:'get'
        })
    },
    updateCategory:(data = {})=>{
        return ajax({
            url: url2,
            data: data,
            method:'post'
        })
    },
    addCategory:(data = {})=>{
        return ajax({
            url: url6,
            data: data,
            method:'post'
        })
    },
    getContentList:(data = {})=>{
        return ajax({
            url: url3,
            data: data
        })
    },
    updateContent:(data = {})=>{
        return ajax({
            url: url4,
            data: data,
            method:'post'
        })
    },
    addContent:(data = {})=>{
        return ajax({
            url: url5,
            data: data,
            method:'post'
        })
    },
    getDetail:(data = {})=>{
        return ajax({
            url: url7,
            data: data
        })
    }
}